package com.itheima.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.itheima.domain.Role;

import lombok.Data;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;


@Data
public class ExcelListener extends AnalysisEventListener<Role> {

    List<Role> list=new ArrayList<>();


    public void invoke(Role role, AnalysisContext analysisContext) {
        System.out.println(role);
        list.add(role);
    }

    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
